/*
 * @描述: 文章列表内容
 * @Author: /songzi
 * @Date: 2019-12-09 17:46:09
 * @Last Modified by: songzi
 * @Last Modified time: 2019-12-09 17:46:32
 */

import React from 'react';
import moment from 'moment';
import { Avatar } from 'antd';
import styles from './index.less';
import 'moment/locale/zh-cn';

moment.locale('zh-cn');

const ArticleListContent = ({ data: { content, updatedAt, avatar, owner, href } }) => (
  <div className={styles.listContent}>
    <div className={styles.description}>{content}</div>
    <div className={styles.extra}>
      <Avatar src={avatar} size="small" />
      <a href={href}>{owner}</a> 发布在 <a href={href}>{href}</a>
      <em>{moment(updatedAt).format('YYYY-MM-DD HH:mm')}</em>
    </div>
  </div>
);

export default ArticleListContent;
